syntax = "proto2";

package tensorflow.core.function.polymorphism.function_type;

import "tensorflow/core/function/trace_type/serialization.proto";

// Represents a serialized Parameter type.
message Parameter {
  enum Kind {
    UNDEFINED = 0;
    POSITIONAL_ONLY = 1;
    POSITIONAL_OR_KEYWORD = 2;
    VAR_POSITIONAL = 3;
    KEYWORD_ONLY = 4;
    VAR_KEYWORD = 5;
  }
  optional string name = 1;
  optional Kind kind = 2;
  optional bool is_optional = 3;
  optional tensorflow.core.function.trace_type.serialization.SerializedTraceType
      type_constraint = 4;
}

// Represents a serialized Capture type.
message Capture {
  optional string name = 1;
  optional tensorflow.core.function.trace_type.serialization.SerializedTraceType
      type_constraint = 2;
}

// Represents a serialized FunctionType.
message FunctionType {
  repeated Parameter parameters = 1;
  repeated Capture captures = 2;
  // TODO(fmuham): Add support for return type.
}
